package com.banch.cloud.payment.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * test controller
 *
 * @author banch
 * @version 1.0
 * @date 2020/5/4
 */
@Slf4j
@Controller
@RequestMapping(value = {"/test"})
public class TestController {

    @Value("${spring.application.name}")
    private String appName;

    @Value("${server.port}")
    private String serverPort;

    @GetMapping(value = {"/hello"})
    @ResponseBody
    public String hello() {

        return "hello,this is " + appName + ":" + serverPort;
    }

}